In this project, adjusted closing prices were used to calculate returns. The adjusted price accounts for corporate actions such as dividends, stock splits, and distributions, ensuring that only genuine market-driven price movements are reflected in the return calculations. This leads to more accurate and consistent return estimates, which is crucial for any meaningful financial analysis or portfolio evaluation.
Volatility is a frequently encountered concept in the world of finance and holds great importance for investors. But what exactly is volatility? Volatility refers to the degree of fluctuation in the price of a financial asset. In other words, it describes how quickly and significantly the price of an asset changes. For investors, volatility can imply risk and uncertainty, but when managed with the right strategies, it can also present opportunities.
In volatility, which measures the price fluctuations of an asset, sudden and large changes in stock prices indicate high volatility. On the other hand, low volatility means that prices are more stable and predictable. Volatility plays a critical role in helping investors determine their risk tolerance and adjust their portfolios accordingly.
There are several ways to measure volatility, but the most common method is the calculation of standard deviation. Standard deviation indicates how much an asset’s return deviates from its average. A high standard deviation signifies high volatility, while a low standard deviation indicates low volatility.
High volatility is often observed during periods of increased uncertainty and risk in the markets. During such times, prices can experience sudden and significant changes, which may amplify both potential gains and losses. Investors should closely monitor market movements during high-volatility periods and rebalance their portfolios if necessary. High volatility typically arises due to factors such as economic uncertainty, political events, natural disasters, or major company-specific developments.
Our data spans from 2019 to 2024, a period marked by major global events that likely influenced market volatility. These include the COVID-19 pandemic (2020), vaccine-driven recovery (2021), the Russia-Ukraine war (2022), global inflation and interest rate hikes (2022–2023), the AI stock rally (2023), and political and economic uncertainty in 2024. These events should be considered when interpreting volatility and asset performance.
To examine these effects more closely, we will use the volatility graph. This will allow us to compare the daily return variability of Apple, Microsoft, and Tesla more accurately, and better understand how each stock responded to market events during the 2019–2024 period.
During the first half of 2020, coinciding with the onset of the COVID-19 pandemic, all three stocks—AAPL, MSFT, and TSLA—experienced a sharp rise in volatility, reflecting heightened market uncertainty. As vaccines became available in early 2021, volatility declined noticeably, suggesting a return of investor confidence. The beginning of the Russia–Ukraine war in early 2022 triggered another local peak in volatility across all three stocks, followed by a gradual decline as markets adjusted to the new geopolitical reality.
Up to this point, the volatility trajectories of AAPL, MSFT, and TSLA remained broadly aligned, showing similar patterns of reaction and stabilization. However, after the emergence of AI-driven market narratives in 2023, a divergence began to appear. While AAPL and MSFT continued on a more stable and declining volatility path, TSLA’s volatility began to rise again—indicating a renewed period of elevated risk, possibly driven by speculation or sector-specific factors.
While volatility captures the fluctuations in returns, it does not reflect the magnitude of losses investors might endure. To address this limitation, we turn to the concept of Maximum Drawdown (MDD), MDD = (Trough Value - Peak Value) / Peak Value which measures the largest decline from a peak to a trough over the entire period. It reflects the most severe loss an investor could have faced.
SOMETHING WRONG HERE
## Maximum Drawdown of AAPL: NaN
## Maximum Drawdown of MSFT: 0.3714849
## Maximum Drawdown of TSLA: 0.7363222
The Maximum Drawdown results further confirm Tesla’s high-risk profile. While Apple and Microsoft experienced drawdowns of approximately 31% and 37% respectively, Tesla’s drawdown exceeded 73%. This indicates that during the worst observed period, Tesla investors could have faced a significantly deeper loss, highlighting the asset’s vulnerability to extreme downturns.
Historically, Tesla’s maximum drawdown has also been larger compared to Apple and Microsoft; according to one analysis, since 2010, Tesla stock has experienced a peak loss of around 61%, whereas Apple’s largest drawdown remained around 40%.
However, in finance, risk does not simply mean danger — it also represents opportunity. Higher risk can imply greater return potential, which is why many investors are still attracted to stocks like TSLA despite their volatility and drawdown profiles.
Two commonly used methods are the arithmetic mean return and the geometric mean return, each with its advantages and limitations. The appropriate method should be selected based on the purpose and context of the analysis.
The arithmetic mean is calculated by adding up all daily or annual returns over a period and dividing the total by the number of observations. Due to its simplicity, it is widely used for short-term performance comparisons and return estimates.
At the beginning of 2020, when COVID-19 brought the entire world to a standstill, uncertainty prevailed. But technology responded swiftly. Remote work, digital services, and electric vehicles surged — and Tesla soared. Microsoft and Apple, on the other hand, offered investors confidence through more cautious but steady growth.
When vaccines were developed, markets breathed a sigh of relief and stock prices climbed. However, new threats soon emerged: war, supply chain issues, and inflation. The year 2022 became a period of decline for all tech stocks, prompting investors to act more cautiously once again.
Then came 2023 — the rise of artificial intelligence. Microsoft stood out with its partnership with OpenAI. Tesla once again drew attention with its autonomous technologies. As always, Apple maintained its stability. Technology once again began to shape the future.
While Apple and Microsoft have maintained a more stable and balanced return profile throughout the period, Tesla has recorded both the highest and lowest returns in different time frames. These sharp fluctuations make Tesla the most illustrative example for understanding the relationship between risk and return.
In the first half of 2020, as the pandemic shook global markets, Tesla experienced a remarkable surge. Both its volatility and returns peaked. This was one of those periods where taking risk clearly paid off.
However, the same relationship did not always hold. In the first half of 2022, amidst geopolitical tensions and economic uncertainty, Tesla once again showed high volatility — but this time, returns turned negative. In other words, the same level of risk resulted in a loss instead of a gain.
By 2023, Tesla had regained strength. As the broader market recovered, its returns began to rise again. Taken together, these periods demonstrate that volatility can signal not only potential gains, but also the risk of significant losses.
There is a well-known saying often attributed to economist Harry Markowitz, the father of Modern Portfolio Theory:
“Diversification is the only free lunch in investing.”
Or, as people like to put it more casually: “Don’t put all your eggs in one basket.”
Diversification means spreading investments across different assets to reduce exposure to the risk of any single investment.
The basic idea is that not all assets move in the same direction at the same time.
By combining assets with different risk and return profiles, investors can potentially reduce the overall risk of their portfolio while maintaining reasonable return expectations.
The goal of diversification is to reduce overall volatility and achieve a more balanced return by combining assets with low correlation.
Correlation analysis is conducted to identify which assets, when combined in a portfolio, will have a risk-reducing effect.
Low correlation reduces portfolio volatility.
High correlation increases portfolio volatility.
## AAPL TSLA MSFT
## AAPL 1.0000000 0.4659280 0.7341606
## TSLA 0.4659280 1.0000000 0.4318455
## MSFT 0.7341606 0.4318455 1.0000000
AAPL – TSLA = 0.47
A moderate positive relationship. Sometimes they move together,
sometimes they don’t.
AAPL – MSFT = 0.73
A strong positive relationship. They generally move in the same
direction.
TSLA – MSFT = 0.43
A moderate relationship. Sometimes they move similarly, but there is
also a degree of independence.
We will use these results to build our portfolio diversification strategy.
Assets with very high correlation (such as AAPL and MSFT) provide less diversification.
Assets with moderate or low correlation (such as TSLA and AAPL or TSLA and MSFT) provide better diversification.
The goal is to determine whether the assets added to the portfolio balance each other or tend to move in the same direction.
Our hypothesis is as follows:
Low Risk / Stability Objective:
A portfolio weighted 50% Microsoft and 50% Apple is expected to provide
stable but limited returns due to its low volatility.
Balanced Risk / Return Objective:
A portfolio weighted 50% Microsoft, 30% Apple, and 20% Tesla is expected
to offer moderate returns with an acceptable level of risk.
High Return / High Risk Objective:
A portfolio weighted 50% Tesla, 25% Apple, and 25% Microsoft is expected
to deliver the highest potential returns, despite higher
volatility.
Maximum Sharpe Ratio Objective:
A portfolio weighted 85% Microsoft and 15% Tesla is expected to provide
the highest return per unit of risk, maximizing the Sharpe
Ratio.
##
## ==== Low Risk / Stability ====
## Annual Return: 44.82 %
## Annual Volatility: 33.95 %
## Sharpe Ratio: 1.32
##
## ==== Balanced Risk / Return ====
## Annual Return: 39.03 %
## Annual Volatility: 30.54 %
## Sharpe Ratio: 1.28
##
## ==== High Return / High Risk ====
## Annual Return: 51.48 %
## Annual Volatility: 40.84 %
## Sharpe Ratio: 1.26
##
## ==== Maximum Sharpe Ratio ====
## Annual Return: 34.63 %
## Annual Volatility: 30.13 %
## Sharpe Ratio: 1.15
Balanced Portfolio (50% MSFT – 30% AAPL – 20%
TSLA)
Achieved the highest Sharpe ratio of 1.28, with an annual return of 39%
and volatility of 30.5%.
This represents the best balance between risk and return.
Low-Risk Portfolio (50% MSFT – 50% AAPL)
Stands out as the least risky option, offering a 32% annual return with
relatively low volatility.
High-Return Portfolio (50% TSLA – 25% AAPL – 25%
MSFT)
Provides the highest potential return of 51.5% annually, but comes with
high volatility of 40.8%, making it susceptible to significant
fluctuations.
Maximum Sharpe Portfolio (85% MSFT – 15%
TSLA)
Appears theoretically efficient, but does not outperform the balanced
portfolio in practice.
Recommendation
We can prove this by calculating standard deviation both for diversified investment and single one and compare them. As we know, standard deviation considered to be a “Risk Marker”, so we expect diversified portfolio to have lower standard deviation score.
## Standard Deviation of AAPL: 0.019426
## Standard Deviation of MSFT: 0.018265
## Standard Deviation of TSLA: 0.04060822
## Standard Deviation of Diversified Portfolio: 0.02174893
As you can see, our diversified portfolio has 2% of Standard Deviation, meanwhile, AAPL and MSFT have 1.94% and 1.83% respectively. That means 2 things. 1 - I was wrong, Standard deviation of our portfolio is higher. 2 - AAPL and MSFT itself more safe asset to have.
Why then Mr. Markowitz was so desperate about diversification? And the answer is - return. Let me explain.
When we combine these three stocks into an equally weighted diversified portfolio, the portfolio’s standard deviation is 2.17%, which is lower than Tesla’s individual risk, but slightly higher than Apple’s or Microsoft’s risk.
This result demonstrates that diversification reduces the overall impact of the riskiest asset in the portfolio. Even though the portfolio still carries some risk, the extreme fluctuations of Tesla are balanced out by the relative stability of Apple and Microsoft.
Moreover, the potential return of the diversified portfolio remains attractive, since it still benefits from Tesla’s higher return potential while reducing its extreme downside risk.
Therefore, this example illustrates why diversification makes sense in practice: it helps to lower risk while preserving opportunities for higher returns.
Is simple terms, as we want our portfolio to grow, we can invest in risky assets to gain more and still consider our portfolio to be safe, using this.
Let me demonstrate it, using the following chart:
The Risk-Return Comparison chart illustrates how diversification helps to balance risk and return.
We can see that Tesla provides the highest average return (0.28%) but comes with the highest risk (4.06% standard deviation). On the other hand, Apple and Microsoft offer lower risk (around 1.8–1.9%) but also lower returns (around 0.11–0.14%).
The diversified portfolio, which combines all three stocks equally, achieves a higher return (0.18%) than Apple and Microsoft individually, while maintaining a moderate risk (2.17%), significantly lower than Tesla’s standalone risk.
This shows that diversification allows us to benefit from the growth potential of riskier assets like Tesla while keeping the overall risk at an acceptable level thanks to the stabilizing effect of safer assets like Apple and Microsoft.
In other words, diversification does not eliminate risk entirely, but it smooths the extremes, providing a more balanced and resilient portfolio that preserves the opportunity for higher returns without fully exposing the investor to the risks of any single stock.
To strengthen the analysis, we conducted two additional statistical tests: • T-Test: This test was used to check whether the difference in returns between Tesla and Apple is statistically significant. The results confirmed that Tesla’s returns are not significantly higher than Apple’s, with a p-value above 0.05, supporting the conclusion that Tesla offers nearly same potential returns but at a higher risk.(Askim, please check. Maybe I calculated it wrong. It shouldn’t be the same)
##
## Welch Two Sample t-test
##
## data: as.vector(returns_tsla) and as.vector(returns_aapl)
## t = 1.1788, df = 2163.8, p-value = 0.2386
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.000906551 0.003638499
## sample estimates:
## mean of x mean of y
## 0.002814698 0.001448724
• Linear Regression: A regression analysis between Tesla’s returns and the diversified portfolio’s returns revealed a positive relationship. This indicates that Tesla’s performance has a measurable influence on the portfolio’s overall return, contributing to both its higher return and higher volatility. This supports the idea that adding a riskier asset like Tesla can boost portfolio performance while still maintaining a balanced risk profile thanks to diversification.
# Линейная регрессия доходности Tesla против доходности портфеля
regression_model <- lm(returns_tsla ~ portfolio_returns)
# Вывод результата
summary(regression_model)
##
## Call:
## lm(formula = returns_tsla ~ portfolio_returns)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.15486 -0.01074 -0.00018 0.01057 0.09931
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0001613 0.0004944 -0.326 0.744
## portfolio_returns 1.6468658 0.0226633 72.667 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.01914 on 1507 degrees of freedom
## Multiple R-squared: 0.778, Adjusted R-squared: 0.7778
## F-statistic: 5280 on 1 and 1507 DF, p-value: < 2.2e-16
The linear regression results show a strong and statistically significant positive relationship between the returns of Tesla and the returns of the diversified portfolio.
Since the p-value is nearly 0, the probability of the result being an accident is extremely low. We can trust the result.
The coefficient of 1.65 indicates that Tesla’s returns amplify the portfolio’s movements, meaning Tesla behaves like a high-beta asset, increasing portfolio returns when the portfolio performs well, but also increasing losses when the portfolio performs poorly (higher volatility). That means that when our portfolio grows 1%, Tesla grows 1.65%.
With an R-squared of 77.8%, the model explains a large portion of Tesla’s return variability, confirming that Tesla’s performance is closely related to the portfolio’s overall dynamics. This reinforces the idea that adding Tesla to a diversified portfolio can boost returns, but it also makes the portfolio more sensitive to market movements. ⸻